home *** CD-ROM | disk | FTP | other *** search
-
- /*© copyright 1996 UserLand Software, Inc. All Rights Reserved.*/
-
-
- #ifndef odbEngineInclude
- #define odbEngineInclude
-
- #include <Types.h>
- #include <QuickDraw.h>
- #include <Files.h>
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- typedef struct odb_ * odbRef;
-
- typedef unsigned short odbBool;
-
- typedef unsigned char odbString [256];
-
- typedef enum odbDirection {
-
- nodirection = 0,
-
- dir_up = 1,
-
- dir_down = 2,
-
- dir_left = 3,
-
- dir_right = 4,
-
- dir_flatup = 5,
-
- dir_flatdown = 6,
-
- dir_sorted = 8,
-
- dir_pageup = 9,
-
- dir_pagedown = 10,
-
- dir_pageleft = 11,
-
- dir_pageright = 12
- } odbDirection;
-
-
- typedef enum odbValueType {
-
- unknownvaluetype = '????',
-
- charvaluetype = 'char',
-
- shortvaluetype = 'shor',
-
- longvaluetype = 'long',
-
- binaryvaluetype = 'data',
-
- booleanvaluetype = 'bool',
-
- tokenvaluetype = 'tokn',
-
- datevaluetype = 'date',
-
- addressvaluetype = 'addr',
-
- codevaluetype = 'code',
-
- extendedvaluetype = 'exte',
-
- stringvaluetype = 'TEXT',
-
- externalvaluetype = 'xtrn',
-
- directionvaluetype = 'dir ',
-
- string4valuetype = 'type',
-
- pointvaluetype = 'QDpt',
-
- rectvaluetype = 'qdrt',
-
- patternvaluetype = 'tptn',
-
- rgbvaluetype = 'cRGB',
-
- fixedvaluetype = 'fixd',
-
- singlevaluetype = 'sing',
-
- doublevaluetype = 'doub',
-
- objspecvaluetype = 'obj ',
-
- filespecvaluetype = 'fss ',
-
- aliasvaluetype = 'alis',
-
- enumeratorvaluetype = 'enum',
-
- listvaluetype = 'list',
-
- recordvaluetype = 'reco',
-
- outlinevaluetype = 'optx',
-
- wptextvaluetype = 'wptx',
-
- tablevaluetype = 'tabl',
-
- scriptvaluetype = 'scpt',
-
- menubarvaluetype = 'mbar',
-
- picturevaluetype = 'pict'
-
- } odbValueType;
-
-
- typedef union odbValueData {
-
- odbBool flvalue;
-
- unsigned char chvalue;
-
- short intvalue;
-
- long longvalue;
-
- unsigned long datevalue;
-
- odbDirection dirvalue;
-
- OSType ostypevalue;
-
- Handle stringvalue;
-
- Handle addressvalue;
-
- Handle binaryvalue;
-
- Handle externalvalue;
-
- Point pointvalue;
-
- Rect **rectvalue;
-
- Pattern **patternvalue;
-
- RGBColor **rgbvalue;
-
- Fixed fixedvalue;
-
- float singlevalue;
-
- double **doublevalue;
-
- Handle objspecvalue;
-
- FSSpec **filespecvalue;
-
- Handle aliasvalue; /*AliasHandle*/
-
- OSType enumvalue;
-
- Handle listvalue;
-
- Handle recordvalue;
- } odbValueData;
-
-
- typedef struct odbValueRecord {
-
- odbValueType valuetype;
-
- odbValueData data;
- } odbValueRecord;
-
-
- /*prototypes*/
-
- extern pascal odbBool odbNewFile (short);
-
- extern pascal odbBool odbOpenFile (short, odbRef *odb);
-
- extern pascal odbBool odbSaveFile (odbRef odb);
-
- extern pascal odbBool odbCloseFile (odbRef odb);
-
- extern pascal odbBool odbDefined (odbRef odb, odbString bspath);
-
- extern pascal odbBool odbDelete (odbRef odb, odbString bspath);
-
- extern pascal odbBool odbGetType (odbRef odb, odbString bspath, OSType *type);
-
- extern pascal odbBool odbGetValue (odbRef odb, odbString bspath, odbValueRecord *value);
-
- extern pascal odbBool odbSetValue (odbRef odb, odbString bspath, odbValueRecord *value);
-
- extern pascal odbBool odbNewTable (odbRef odb, odbString bspath);
-
- extern pascal odbBool odbCountItems (odbRef odb, odbString bspath, long *count);
-
- extern pascal odbBool odbGetNthItem (odbRef odb, odbString bspath, long n, odbString bsname);
-
- extern pascal odbBool odbGetModDate (odbRef odb, odbString bspath, unsigned long *date);
-
- extern pascal void odbDisposeValue (odbRef odb, odbValueRecord *value);
-
- extern pascal void odbGetError (odbString bs);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-